import {createRouter, createWebHistory} from 'vue-router'
import index from '../views/index.vue'
import realTimeData from '../components/realTimeData.vue'
import CO2PieChart from "../components/CO2PieChart.vue";
import CO2LineGraph from "../components/CO2LineGraph.vue";
import images from "../components/images.vue";
import realMonitor from "../components/realMonitor.vue";
import formData from "../components/formData.vue";
import temperatureLineGrape from "../components/temperatureLineGrape.vue";
import waterBarChart from "../components/waterBarChart.vue";
import NLineGraph from "../components/NLineGraph.vue";
import login from "../views/login.vue";

const routes = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        name: '登录',
        component: login
    },
    {
        path: '/index',
        name: '首页',
        component: index
    },
    {
        path: '/realTimeData',
        name:'五个实时数据',
        component: realTimeData
    },
    {
        path: '/CO2PieChart',
        name:'四个大棚CO2对比饼状图',
        component: CO2PieChart
    },
    {
        path: '/CO2LineGraph',
        name: '四号大棚的co2变化曲线',
        component: CO2LineGraph
    },
    {
        path: '/images',
        name: '大棚照片波轮图',
        component: images
    },
    {
        path: '/realMonitor',
        name: '实时监控画面',
        component: realMonitor
    },
    {
        path: '/formData',
        name: '数据表',
        component: formData
    },
    {
        path: '/temperatureLineGraph',
        name: '土壤和空气温度曲线图',
        component: temperatureLineGrape
    },
    {
        path: '/waterBarChart',
        name: '土壤含水量柱状图',
        component: waterBarChart
    },
    {
        path: '/NLineGraph',
        name: '土壤氮含量',
        component: NLineGraph
    }

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router